import java.util.Scanner;

public class Demo11 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// Monday，Tuesday、Wednesday、Thursday、Friday、Saturday 、Sunday
		System.out.println("请输入第1个字母：");
		char c = sc.next().charAt(0);
		if (c == 'M' || c == 'm') {
			System.out.println("星期一");
		} else if (c == 'T' || c == 't') {
			System.out.println("请输入第2个字母：");
			char c2 = sc.next().charAt(0);
			if (c2 == 'U' || c2 == 'u') {
				System.out.println("星期二");
			} else if (c2 == 'H' || c2 == 'h') {
				System.out.println("星期四");
			} else {
				System.out.println("输入有误");
			}
		} else if (c == 'W' || c == 'w') {
			System.out.println("星期三");
		} else if (c == 'F' || c == 'f') {
			System.out.println("星期五");
		} else if (c == 'S' || c == 's') {
			System.out.println("请输入第二个字母");
			char c3 = sc.next().charAt(0);

			if (c3 == 'A' || c3 == 'a') {
				System.out.println("星期六");
			} else if (c3 == 'U' || c3 == 'u') {
				System.out.println("星期天");
			} else {
				System.out.println("输入错误");

			}
		} else {
			System.out.println("输入错误");
		}
	}
}
